home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
basic
/
svgaqb21.zip
/
SVGADEMO.BAS
< prev
next >
Wrap
BASIC Source File
|
1994-05-09
|
24KB
|
714 lines
'****************************************************************************
'*
'* 'SVGAQB' & 'SVGAPV' A Super VGA Graphics Librarys for use with
'* MS QuickBASIC 4.X and MS PDS/VBDOS
'* Copyright 1993-1994 by Stephen L. Balkum and Daniel A. Sill
'*
'* MS, QuickBASIC, PDS, and VBDOS are registered trademarks of
'* Microsoft Corporation. GIF and 'Graphics Interchange Format' are
'* trademarks (TM) ofCompuServe, Incorporated, an H&R Block Company.
'*
'* **************** UNREGISTERED SHAREWARE VERSION **********************
'* * FOR EVALUATION ONLY. NOT FOR RESALE IN ANY FORM. SOFTWARE WRITTEN *
'* * USING THIS UNREGISTERED SHAREWARE GRAPHICS LIBRARY MAY NOT BY SOLD *
'* * OR USED FOR ANY PURPOSE OTHER THAN THE EVALUATION OF THIS LIBRARY. *
'* **********************************************************************
'*
'* **************** NO WARRANTIES AND NO LIABILITY **********************
'* * Stephen L. Balkum and Daniel A. Sill provide no warranties, either *
'* * expressed or implied, of merchant ability, or fitness, for a *
'* * particular use or purpose of this SOFTWARE and documentation. *
'* * In no event shall Stephen L. Balkum or Daniel A. Sill be held *
'* * liable for any damages resulting from the use or misuse of the *
'* * SOFTWARE and documentation. *
'* **********************************************************************
'*
'* ************** U.S. GOVERNMENT RESTRICTED RIGHTS *********************
'* * Use, duplication, or disclosure of the SOFTWARE and documentation *
'* * by the U.S. Government is subject to the restrictions as set forth *
'* * in subparagraph (c)(1)(ii) of the Rights in Technical Data and *
'* * Computer Software clause at DFARS 252.227-7013. *
'* * Contractor/manufacturer is Stephen L. Balkum and Daniel A. Sill, *
'* * P.O. Box 7704, Austin, Texas 78713-7704 *
'* **********************************************************************
'*
'* **********************************************************************
'* * By using this SOFTWARE or documentation, you agree to the above *
'* * terms and conditions. *
'* **********************************************************************
'*
'****************************************************************************
REM $INCLUDE: 'SVGABC.BI'
REM $INCLUDE: 'SVGADEMO.BI'
CLEAR
REDIM POINTARRY3D(0 TO 13) AS P3Dtype
REDIM PLAYARRY(0 TO 13) AS P3Dtype
REDIM PLOTARRY(0 TO 13) AS P2DType
REDIM OPLOTARRY(0 TO 13) AS P2DType
REDIM GFXBLK1(0 TO 100) AS INTEGER
REDIM GFXBLK2(0 TO 100) AS INTEGER
REDIM GFXBLK3(0 TO 100) AS INTEGER
'*************************************************************************
'* SAVE THE STARTING VIDEOMODE AND SET IT TO MODE 3.
'*************************************************************************
STARTVIDEOMODE = VIDEOMODEGET
DUMMY = RESTEXT
CLS
FOR A = 0 TO 33
DUMMY$ = INKEY$ '* CLEAR THE KEYBOARD BUFFER
NEXT A
'*************************************************************************
'* MOVE THE DOS CURSOR TO THE TOP LEFT TO START THE PROGRAM AND SAY HELLO
'*************************************************************************
LOCATE 1, 4
PRINT "'SVGAQB.LIB' A SuperVGA Graphics Library For Use With MS QuickBasic 4.5"
LOCATE 2, 4
PRINT "'SVGAPV.LIB' A SuperVGA Graphics Library For Use With MS PDS and VBDOS"
LOCATE 4, 10
PRINT "Copyright 1993-1994 by Stephen L. Balkum and Daniel A. Sill"
LOCATE 12, 25
PRINT "Demonstration/Example Program"
LOCATE 23, 1
PRINT "Press a key to begin the demo..."
GETKEY (RET$)
CLS
'*************************************************************************
'* LET'S ID THE PROCESSOR FIRST AS THE LIBRARY REQUIRES A 386 OR BETTER.
'*************************************************************************
'LOCATE 1, 1
CPU = WHICHCPU
CPU$ = STR$(CPU)
L = LEN(CPU$)
CPU$ = RIGHT$(CPU$, L - 1)
IF CPU < 386 THEN
PRINT "Sorry, this library requires a 80386 or better processor."
PRINT "Processor is identified as a 80"; CPU$; "."
PRINT "Demo program will be terminated."
PRINT
PRINT "Press a key..."
SOUND 100, 5
WHILE INKEY$ = ""
WEND
VIDEOMODESET (STARTVIDEOMODE)
CLEAR
END
END IF
'*************************************************************************
'* LET'S ID THE VIDEO CARD/CHIP AS THE LIBRARY REQUIRES A SUPERVGA ADAPTER.
'*************************************************************************
VGA = WHICHVGA
PRINT "Microprocessor is identified as a 80"; CPU$; "."
PRINT
SELECT CASE VGA
CASE IS = 1
VGA$ = "Acumos AVGA2/3 SuperVGA"
CASE IS = 2
VGA$ = "ATI Technologies 18/28/38/68800 SuperVGA"
CASE IS = 3
VGA$ = "Ahead V5000 ver A SuperVGA"
CASE IS = 4
VGA$ = "Ahead V5000 ver B SuperVGA"
CASE IS = 5
VGA$ = "Chips and Technologies 82C450/1/2/3/5/6/7 SuperVGA"
CASE IS = 6
VGA$ = "Cirrus Logic CL-GD 5xx,6xx,28xx,54xx,62xx SuperVGA"
CASE IS = 7
VGA$ = "Everex Ev236/6xx Micro Enhancer SuperVGA"
CASE IS = 8
VGA$ = "Genoa 61/62/63/64/6600 SuperVGA"
CASE IS = 9
VGA$ = "NCR 77C21/22/22E/22E+ SuperVGA"
CASE IS = 10
VGA$ = "Oak Technologies OTI-037C/067/077/087 SuperVGA"
CASE IS = 11
VGA$ = "Paradise/Western Digital PVGA1A,WD90C00/1x/2x/3x SuperVGA"
CASE IS = 12
VGA$ = "Realtek RT3106 SuperVGA"
CASE IS = 13
VGA$ = "Trident 8800CS,8900B/C/CL/CX,90x0 SuperVGA"
CASE IS = 14
VGA$ = "Tseng Labs ET3000-AX/BX/BP SuperVGA"
CASE IS = 15
VGA$ = "Tseng Labs ET4000/W32/W32I SuperVGA"
CASE IS = 16
VGA$ = "VESA compatible SuperVGA"
CASE IS = 17
VGA$ = "Video 7 HT-208/16 SuperVGA"
CASE IS = 18
VGA$ = "Avance Logic AL2101 SuperVGA"
CASE IS = 19
VGA$ = "MXIC MX68000/10 SuperVGA"
CASE IS = 20
VGA$ = "Primus P2000 SuperVGA"
CASE ELSE
VGA$ = "Unknown"
VGA = 0
END SELECT
IF VGA < 1 THEN
PRINT "Sorry, unable to identify video card or it is not a SuperVGA video adapter."
PRINT "Demo program will be terminated."
PRINT
PRINT "Press a key..."
SOUND 100, 5
WHILE INKEY$ = ""
WEND
VIDEOMODESET (STARTVIDEOMODE)
CLEAR
END
ELSE
PRINT "Video card/chip is identified as a "; VGA$; "."
END IF
'*************************************************************************
'* LET'S SEE THE HOW MUCH MEMORY IS INSTALLED ON THE SUPER VGA ADAPTER.
'*************************************************************************
VIDEOMEMORY = WHICHMEM
MEM$ = STR$(VIDEOMEMORY)
MEM$ = RIGHT$(MEM$, LEN(MEM$) - 1) + " kB"
IF VIDEOMEMORY < 1 THEN
PRINT "Sorry, unable to identify the amount of installed video memory."
PRINT "Demo program will be terminated."
PRINT
PRINT "Press a key..."
SOUND 100, 5
WHILE INKEY$ = ""
WEND
VIDEOMODESET (STARTVIDEOMODE)
CLEAR
END
ELSE
PRINT "Installed video memory identified as "; MEM$; "."
END IF
'*************************************************************************
'* LET'S TELL THE USER WHAT THE HIGHEST RESOLUTION THAT THE VIDEO CARD
'* AND ITS INSTALLED MEMORY CARD IS CAPABLE OF. THE MONITOR MUST BE ABLE
'* TO SUPPORT THOSE MODES TOO !
'*************************************************************************
PRINT "Video card and installed memory is capable of the following resolutions:"
SELECT CASE VIDEOMEMORY
CASE IS > 2047
PRINT TAB(4); "320x200 in 256 colors"
PRINT TAB(4); "640x400 in 256 colors"
PRINT TAB(4); "640x480 in 256 colors"
PRINT TAB(4); "800x600 in 256 colors"
PRINT TAB(4); "1024x768 in 256 colors"
PRINT TAB(4); "1280x1024 in 256 colors"
MAX = 5
CASE IS > 1023
PRINT TAB(4); "320x200 in 256 colors"
PRINT TAB(4); "640x400 in 256 colors"
PRINT TAB(4); "640x480 in 256 colors"
PRINT TAB(4); "800x600 in 256 colors"
PRINT TAB(4); "1024x768 in 256 colors"
MAX = 4
CAS